const http = require("http");

http.createServer((req, res) => {
    console.log(req.url);
    if(req.url.indexOf("/postdata") >= 0) {
        
    }
    let str = '';
    req.on("data" , (chunk) => {
        str += chunk;
    })
    req.on("end" , () => {
        console.log(str);
        res.end(str);
    })
}).listen(3000);